package main

import (
	"fmt"
	"strings"
)

func main() {
	var str1 string = "lqz is handsome"
	var str2 string = "l"
	var str3 string = "lqz"
	var str4 string = "lqzi"
	fmt.Println(strings.HasPrefix(str1, str2)) // true 开头
	fmt.Println(strings.HasPrefix(str1, str3)) // ture
	fmt.Println(strings.HasSuffix(str1, str4)) // false 结尾

}
